﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LGE;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace UpUp
{
    public class Flag : GameObject
    {
        SpriteSheet ss;


        public Flag(PlayScreen ps, Vector2 position)
            : base(ps, Engine.Load<Texture2D>("Images\\PlayScreen\\flag"))
        {
            ss = new SpriteSheet(this, 6, 40, true);
            this.position = position + new Vector2(43.5f, -61);
        }

        public override void Update(GameTime gameTime)
        {
            ss.Update(gameTime);
            if (!ps.finished && Collision(ps.c))
            {
                Audio.StopSong();
                Audio.PlaySFX(ps.SFX_Win);
                ps.finished = true;
            }
        }
    }
}
